using System;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Xfinity.ParticleSystems
{
    /// <summary>
    /// A basic particle.
    /// </summary>
    /// <remarks>
    /// This structure's layout has been optimised for cache access.
    /// 
    /// The fields are ordered in the order they are accessed.
    /// </remarks>
    public struct Particle
    {
        //public float Mass;
        public Vector3 Acceleration;
        public Vector3 Velocity;
        public Vector3 Position;

        public float Age;
        public float DeathAge;
        public float Size;
        public Color Color;
        public Particle(Vector3 position, Vector3 velocity, Vector3 acceleration)
            : this(position, velocity, acceleration, 0/*,0*/, 1, Color.White) { }

        public Particle(Vector3 position, Vector3 velocity, Vector3 acceleration, /*float mass,*/ float size, float deathAge, Color color)
        {
            this.Position = position;
            this.Velocity = velocity;
            this.Acceleration = acceleration;
            //  this.Mass = mass;
            this.Size = size;
            this.Color = color;
            this.Age = 0;
            this.DeathAge = deathAge;
        }
    }
}
